﻿using System;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TeamSystem.Data.UnitTesting;
using Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions;

namespace Acms.SqlStoredProcedureTests
{
    [TestClass()]
    public class Site_View : DatabaseTestClass
    {

        public Site_View()
        {
            InitializeComponent();
        }

        [TestInitialize()]
        public void TestInitialize()
        {
            base.InitializeTest();
        }
        [TestCleanup()]
        public void TestCleanup()
        {
            base.CleanupTest();
        }

        [TestMethod()]
        public void ColumnTest()
        {
            DatabaseTestActions testActions = this.ColumnTestData;
            // Execute the pre-test script
            // 
            System.Diagnostics.Trace.WriteLineIf((testActions.PretestAction != null), "Executing pre-test script...");
            ExecutionResult[] pretestResults = TestService.Execute(this.PrivilegedContext, this.PrivilegedContext, testActions.PretestAction);
            // Execute the test script
            // 
            System.Diagnostics.Trace.WriteLineIf((testActions.TestAction != null), "Executing test script...");
            ExecutionResult[] testResults = TestService.Execute(this.ExecutionContext, this.PrivilegedContext, testActions.TestAction);
            // Execute the post-test script
            // 
            System.Diagnostics.Trace.WriteLineIf((testActions.PosttestAction != null), "Executing post-test script...");
            ExecutionResult[] posttestResults = TestService.Execute(this.PrivilegedContext, this.PrivilegedContext, testActions.PosttestAction);
        }

        #region Designer support code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.DatabaseTestAction ColumnTest_TestAction;
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Site_View));
            Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.RowCountCondition ColumnRows;
            Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition ColumnId;
            Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition ColumnName;
            Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition ColumnRootUrl;
            Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition ColumnCID;
            this.ColumnTestData = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.DatabaseTestActions();
            ColumnTest_TestAction = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.DatabaseTestAction();
            ColumnRows = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.RowCountCondition();
            ColumnId = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition();
            ColumnName = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition();
            ColumnRootUrl = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition();
            ColumnCID = new Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions.ScalarValueCondition();
            // 
            // ColumnTest_TestAction
            // 
            ColumnTest_TestAction.Conditions.Add(ColumnRows);
            ColumnTest_TestAction.Conditions.Add(ColumnId);
            ColumnTest_TestAction.Conditions.Add(ColumnName);
            ColumnTest_TestAction.Conditions.Add(ColumnRootUrl);
            ColumnTest_TestAction.Conditions.Add(ColumnCID);
            resources.ApplyResources(ColumnTest_TestAction, "ColumnTest_TestAction");
            // 
            // ColumnRows
            // 
            ColumnRows.Enabled = true;
            ColumnRows.Name = "ColumnRows";
            ColumnRows.ResultSet = 1;
            ColumnRows.RowCount = 1;
            // 
            // ColumnId
            // 
            ColumnId.ColumnNumber = 1;
            ColumnId.Enabled = true;
            ColumnId.ExpectedValue = "0";
            ColumnId.Name = "ColumnId";
            ColumnId.NullExpected = false;
            ColumnId.ResultSet = 1;
            ColumnId.RowNumber = 1;
            // 
            // ColumnName
            // 
            ColumnName.ColumnNumber = 2;
            ColumnName.Enabled = true;
            ColumnName.ExpectedValue = "Finale34";
            ColumnName.Name = "ColumnName";
            ColumnName.NullExpected = false;
            ColumnName.ResultSet = 1;
            ColumnName.RowNumber = 1;
            // 
            // ColumnRootUrl
            // 
            ColumnRootUrl.ColumnNumber = 3;
            ColumnRootUrl.Enabled = true;
            ColumnRootUrl.ExpectedValue = "localhost/TestUrl34";
            ColumnRootUrl.Name = "ColumnRootUrl";
            ColumnRootUrl.NullExpected = false;
            ColumnRootUrl.ResultSet = 1;
            ColumnRootUrl.RowNumber = 1;
            // 
            // ColumnCID
            // 
            ColumnCID.ColumnNumber = 5;
            ColumnCID.Enabled = true;
            ColumnCID.ExpectedValue = "0";
            ColumnCID.Name = "ColumnCID";
            ColumnCID.NullExpected = false;
            ColumnCID.ResultSet = 1;
            ColumnCID.RowNumber = 1;
            // 
            // ColumnTestData
            // 
            this.ColumnTestData.PosttestAction = null;
            this.ColumnTestData.PretestAction = null;
            this.ColumnTestData.TestAction = ColumnTest_TestAction;
        }

        #endregion


        #region Additional test attributes
        //
        // You can use the following additional attributes as you write your tests:
        //
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        //
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        //
        #endregion

        private DatabaseTestActions ColumnTestData;
    }
}
